home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11501 < prev    next >
Encoding:
Text File  |  1996-08-05  |  956 b   |  36 lines

  1. Path: news.uh.edu!pmn12564
  2. From: pmn12564@Bayou.UH.EDU (pat neff)
  3. Newsgroups: comp.lang.c++
  4. Subject: Pointer to interrupt method in BC 4.52
  5. Date: 14 Mar 1996 19:37:28 GMT
  6. Organization: University of Houston
  7. Message-ID: <4i9sho$3mj@masala.cc.uh.edu>
  8. NNTP-Posting-Host: bayou.uh.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11.     I have a class in which one of the methods is an interrupt.  Since I need
  12. to hook the interrupt into the interrupt table, I need a pointer to it.     
  13. Something like:
  14.  
  15. class myobject {
  16.  
  17. void interrupt myinterrupt(...);
  18. void dohook ();
  19. }
  20.  
  21. void interrupt myobject::myinterrupt (...)
  22. {
  23.   // actuall interrupt code here
  24. }
  25.  
  26. void myobject::dohook ()
  27. {
  28.    setvect (0x??, this->myinterrupt);
  29. }
  30.  
  31.      This compiler complains about the line with SETVECT saying I need to
  32. call or take the address of the interrupt function.  I am trying to take the
  33. address of course.  I have tried everything, but NO LUCK!  Can anyone out     
  34. there help me? 
  35.  
  36.